<template>
  <div class="home">
    <div class="tabbar">
      <van-button icon="apps-o" type="primary" plain />
      <van-search
        class="search"
        v-model="value"
        shape="round"
        placeholder="请输入搜索关键词"
      />
    </div>
    <!-- 影院热映 -->
    <hotshow />
    <!-- 豆瓣榜单 -->
    <h3 style="padding-left:10px;margin: 20px 0 10px 0;">豆瓣榜单</h3>
    <weekly />
  </div>
</template>

<script>
import Hotshow from '@/components/hotshow'
import Weekly from '@/components/weekly'
import { getTags } from '@/api/home'
export default {
  name: 'home',
  data () {
    return {
      value: '',
    }
  },
  methods: {

  },
  computed: {},
  components: {
    Hotshow,
    Weekly,
  },
  created () {
    getTags()
      .then(res => {
        this.hotShow = res.subjects
        // console.log(this.hotShow)
      }).catch(console.log)

  },
}
</script>

<style lang='less' scoped>
.home {
  h1, h3 {
    margin: 0;
    padding: 0;
  }
  margin-bottom: 50px;
}
.tabbar {
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  .search {
    flex: 1;
    padding: 0 15px 0 0;
  }
  .van-icon-apps-o {
    border: none;
  }
  .van-icon-apps-o:before {
    font-size: 24px;
  }
  .van-button--primary {
    border: none;
  }
}

</style>
